package sh.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

import sh.model.Book;
import sh.service.BookService;
import sh.service.impl.BookServiceImpl;

public class DefaultAction extends ActionSupport{
	private List<Book> books;
	//展示首页信息
	@Override
	public String execute() throws Exception {
		BookService bookService = new BookServiceImpl();
		setBooks(bookService.getAll());
		return super.execute();
	}
	public void setBooks(List<Book> books) {
		this.books = books;
	}
	public List<Book> getBooks() {
		return books;
	}
	
}
